package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.UserInfo;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserInfoRepository extends MongoRepository<UserInfo,String>{

    /**
     * 通过手机查询用户对象信息
     * @param phone
     * @return
     */
    UserInfo findByPhone(String phone);

    // 通过关键字查询用户
    List<UserInfo> findByCity(String keyword);
}
